package com.winshare.saleAssistant.dao;

import com.winshare.saleAssistant.domain.entity.AppRoleStaffDO;
import com.winshare.saleAssistant.domain.entity.RoleDO;
import com.winshare.saleAssistant.domain.entity.RoleStaffDO;
import com.winshare.saleAssistant.domain.entity.StaffDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface StaffRoleMapper {

    int batchInsertStaffRole(@Param("roleStaffList")List<RoleStaffDO> roleStaffList);

    int deleteRoleStaff(RoleStaffDO roleStaffDO);

    int countStaffByRole(RoleDO roleDO);

    int batchInsertStaffAppRole(@Param("appRoleStaffList")List<AppRoleStaffDO> appRoleStaffDOList);

    int deleteAllRoleByStaffId(StaffDO staffDO);

    int deleteAllAppRoleByStaffId(StaffDO staffDO);

    int countPersonByRole(RoleDO roleDO);
}
